<template>
  <div>
    <FormPanel ref="from" :list="formList" @formChange="changeHandle" :isSubmitBtn="false" :collapse="false" labelWidth="110" />
    <div style="height:47px;"></div>
    <div
      :style="{
        position: 'absolute',
        left: 0,
        bottom: 0,
        right: 0,
        zIndex: 9,
        borderTop: '1px solid #e9e9e9',
        padding: '10px 20px',
        background: '#fff',
        textAlign: 'right'
      }"
    >
      <el-button @click="closeDrawer(1)">关 闭</el-button>
      <el-button @click="closeDrawer(2)" type="primary">保 存</el-button>
    </div>
  </div>
</template>
<script>
export default {
  data(){
    return{
      formList:this.createdFrom()
    }
  },
  methods:{
    createdFrom(){
      return [
        {
          type: 'SELECT',
          label: '车系名称',
          fieldName: 'CXMC',
          placeholder: '请选择',
          disabled:true,
          itemList:[]
        },
        {
          type: 'SELECT',
          label: '车型名称',
          fieldName: 'CXMC2',
          placeholder: '请输入',
          disabled:true,
          itemList: [],
        },
        {
          type: 'DATE',
          label: '月份',
          fieldName: 'month',
          placeholder: '请选择',
          disabled:true,
          dateType:'month'
        },
        {
          type: 'INPUT',
          label: '经销商代码',
          fieldName: 'jxsdm',
          placeholder: '请输入',
          disabled:true,
        },
        {
          type: 'INPUT',
          label: '经销商名称',
          fieldName: 'jxsmc',
          placeholder: '请选择',
          disabled:true,
        },
        {
          type: 'SELECT',
          label: '事业部',
          fieldName: 'syb',
          placeholder: '请选择',
          disabled:true,
          itemList:[]
        },
        {
          type: 'INPUT',
          label: '任务数量(批售)',
          fieldName: 'rwslps',
          placeholder: '请选择',
          rules: [{ required: true, message: '请输入', trigger: 'blur' }],
        },
        {
          type: 'INPUT',
          label: '任务数量(终端)',
          fieldName: 'rwslzd',
          placeholder: '请选择',
          rules: [{ required: true, message: '请输入', trigger: 'blur' }],
        },
        {
          type: 'DATE',
          label: '拆解日期',
          fieldName: 'cjrq',
          placeholder: '请选择',
          disabled:true,
        },
        {
          type: 'INPUT',
          label: '占比',
          fieldName: 'zb',
          placeholder: '请选择',
          disabled:true,

        },

      ]
    },
    changeHandle(val){

    },
    closeDrawer(type){

    }
  }
}
</script>
